package com.demo.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.demo.mapper.datasourceA.UserMapper;
import com.demo.model.datasourceA.User;
import com.demo.service.UserService;

@Service
public class UserServiceImpl implements UserService {

	@Autowired
	UserMapper userMapper;
	
	@Override
	@Transactional
	public int insertUser(User record) {
		if (null == record) {
			return 0;
		}
		return userMapper.insert(record);
	}

	@Override
	public User selectUserById(Integer id) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public List<User> selectAllUser() {
		return userMapper.selectAll();
	}

}
